<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
    </head>
    <body>
    1
    <div>2</div>
    3
    <div>4</div>
    5
    <div>6</div>
    7
    </body>
    <script>
        //body有几个子元素？几个子节点
        var body = document.body;
        var childNodes = body.childNodes;
        var children = body.children;
        //childNodes不仅会获取元素节点，还会获取文本节点，ie8及以下会忽略空白文本节点
        //children只会回去元素节点
    </script>
</html>